<?php
/**
 * 后台首页
 * @author      zlc
 * @version     1.0
 */

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class IndexController extends Controller
{
    /**
     * 后台布局
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function layout()
    {
        $user = Auth::user();
        $userName = $user->username;
        $adminId = $user->id;
        return view('admin.layout')->with('username',$userName)->with('adminId',$adminId);
    }

    /*
    * 控制台
    */
    public function control(){
        $adminData = Auth::user();
        return view('admin.index.control')->with('adminData',$adminData);
    }
}
